<template>
  <div class="middleware-nuxt">
    <h2>middleware-nuxt</h2>
    <div>
      <NuxtLink to="/06_middleware-nuxt/detail/123">
        <button>detail</button>
      </NuxtLink>
      <NuxtLink to="/06_middleware-nuxt/page-meta">
        <button>page-meta</button>
      </NuxtLink>
    </div>
    <NuxtPage></NuxtPage>
  </div>
</template>

<script setup lang="ts">
  definePageMeta({
    // 命名中间件( 复用 )
    middleware: ["home"], // 指定中间件
  });
</script>

<style lang="less" scoped>
  .middleware-nuxt {
  }
</style>
